package com.oamicnet.boot.config.config;

import com.oamicnet.boot.config.service.UserService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBeanConfig2 {

    @Bean
    @ConditionalOnMissingBean(UserService.class)
    public UserService userService2() {
        System.out.println("MyBeanConfig userService2");
        return new UserService();
    }

}
